
from PartData import PartData
from abq_inp_parse import Instance
from rotate import rotate_3d_points

class PartDataINP(PartData):

    def __init__(self, inst:Instance):
        
        node_arr = inst.ref_part.node_array
        if not inst.translate is None:
            node_arr = node_arr + inst.translate
        if not inst.rotation is None:
            node_arr = rotate_3d_points(node_arr, *inst.rotation)
        element_dict = inst.ref_part.elem_types
        node_id_to_index = inst.ref_part.node_id_to_index
        super().__init__(node_arr, element_dict, node_id_to_index)


    

    
    